
import 'dart:ui';
import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:amap_flutter_map/amap_flutter_map.dart';

class Settings {
  ///系统编号
  static const systemNo = "th";

  ///请求是 header 中的TOKEN key
  static const headerTokenKey="Access-Token";

  // static const nginxIp = "http://8.148.26.154:11111";
  // static const websocket = "ws://8.148.26.154:9292/customer-service/websocket";
  // static const appServerIp = "http://8.148.26.154:9292";

  static const nginxIp = "http://172.16.80.23:11111";
  static const websocket = "ws://218.28.172.218:9999/th/websocket";
  static const appServerIp = "http://218.28.172.218:9999";
  // static const appServerIp = "https://218.28.172.218";

  // static const websocket = "ws://192.168.1.4:9999/th/websocket";
  // static const appServerIp = "http://192.168.1.4:9999";
  static const sdpFiles =  "sdpFiles"; //所有系统上传的文件都在此文件夹下
  static const fileServer = '$nginxIp/files';//文件访问地址,在NGINX里面进行配置、、
  static const imageUploadServer = '$appServerIp/$systemNo/SysUploadController/imageUp';
  static const fileUploadServer = '$appServerIp/$systemNo/SysUploadController/fileUp';
  static const downLoadServer = '$appServerIp/$systemNo/SysUploadController/down/'; //默认文件下载后台方法
  static const appServer = '$appServerIp/$systemNo';//APP后台地址,不要配置127

  ///主题色
  static const primaryColor = Color.fromRGBO(24,144,255, 1.0);
  ///背景颜色
  static const backgroundColor = Color.fromRGBO(240, 240, 240, 1);
  ///字体颜色
  static const fontColor = Color.fromRGBO(51, 51, 51, 1);

  ///默认每页显示记录数
  static const pageSize = 20;

  ///查询是，如果是between 默认给字段加上2个后缀
  static const String stSign = "_st";
  static const String etSign = "_et";

  ///queryform标签的后缀名
  static const String queryFormEtSign = "QueryFrom_";

  ///表单类型
  static const Map formType={
    "表单":"form",
    "查询表单":"queryForm"
  };


  ///websocket数据类型
  static const Map websocketDataType ={
    "审批数据类型":'1',
    "待处理的报警数量":'2',
    "设备和报警数量统计":"3"
  };

  ///本地缓存用到的key
  static const Map localStorageKeys = {
    "token":"token",
    "empNo":"empNo",
    "当前位置":"currentPosition",//当前位置
    "推送令牌":"registrationId",
    "本机号码":"phoneNumber",
  };

  ///数据字典编码
  static const Map dictCodes={
    '是否':'6',
    '组织':'5',
    '区域':'4431792594527604736',
    '配电室':'4431792741126918144',
    '设备':'4432532312391307264',
    '温湿度设备':'4433357062399217664',
    '烟感设备':'4433357187825684480',
    '设备类型':'4431795983760117760',
    '报警类型':'4431850162222419968',
    '报警处理状态':'4431855854601785344',
    '报警处理类型':'4432506122557345792',
    '报警结果类型':'4432537858443988992',
    '设备报修状态':'4433684236486463488'

  };

  static const Map constants={
    "是":"1",
    "否":"0",
    "报警策略_不报警":"1",
    "报警策略_超上限":"2",
    "报警策略_超下限":"3",
    "报警策略_超上下限":"4",
    "报警处理_未处理":"1",
    "报警处理_已处理":"2",
    "报警类型_温度":"1",
    "报警类型_湿度":"2",
    "报警类型_烟感":"3",
    "报警结果类型_超过上限":"1",
    "报警结果类型_低于下限":"2",
    "报警处理类型_已知":"1",
    "报警处理类型_误报":"2",
    "websocket_待处理的报警数量":"2",
    "websocket_设备和已报警数量":"3",
    "设备类型_温湿度变送器":"1",
    "设备类型_烟感探测器":"2",
    "设备维修状态_报修":"1",
    "设备维修状态_维修":"2",
    "设备状态_正常":"1",
    "设备状态_故障":"2"
  };


  static const sysConfig={
    "安卓APP版本号参数":'rEQiu+mkWqq',
    "安卓APP下载地址参数":'rEQopsZwWqq'
  };


  ///高德地图
  static const AMapApiKey amapApiKeys = AMapApiKey(
      androidKey: 'b0f30e284b57ba3a2acaa937553c911f',
      iosKey: '62c2291055660b7c67efa2bb29e023ab');
  static const AMapPrivacyStatement amapPrivacyStatement = AMapPrivacyStatement(hasContains: true, hasShow: true, hasAgree: true);

  ///默认层级
  static const double zoom = 17;
  ///默认地图中心
  static const initialPosition = CameraPosition(target: LatLng(34.744747, 113.652936), zoom: zoom,);


}